<template>
	<div class="singlepage">
		<AboutUsTop></AboutUsTop>
	  <div class="home">
      <p style="margin-top: 10px;width:95%;margin:0 auto" v-html='content'></p>
	  </div>
    
  </div>
</template>
<script>
import AboutUsTop from './components/AboutUsTop.vue'
import { loadAboutUs } from '@/api/allapis.js'
export default{
  name: 'AboutUs',
  data(){
    return{
      id:'',//文章id
      content:'',
      list:''//文章列表
    }
  },
  mounted(){
    this.id = this.$route.params.id
    this.loaddata()
     
  },
  methods:{
    //拉取单页信息
    loaddata(){
      loadAboutUs().then(response=>{
        // this.content = rosponse.data.info.content
        // this.list = response.data.list
        // console.log(JSON.stringify(response))
        if(this.id == 1){
            this.content = response.data.list[0].content
        }else if(this.id == 2){
            this.content = response.data.list[1].content
        }else if(this.id == 3){
            this.content = response.data.list[2].content
        }else if(this.id == 4){
            this.content = response.data.list[3].content
        }else if(this.id == 5){
            this.content = response.data.list[4].content
        }else if(this.id == 6){
            this.content = response.data.list[5].content
        }

    })
    },
  },
  components:{
    AboutUsTop,
  }
}
</script>
<style>
.singlepage{padding-top:50px;}
</style>



